package com.rybbaby.tss.platform.sysHandlePermissionsStyles.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Version;

import com.rybbaby.tss.core.utils.StringUtils;
import com.rybbaby.tss.platform.sysHandlePermissions.entity.SysHandlePermissions;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

/**
 * @description 操作权限html元素内联样式
 * 
 * @author 谢进伟
 * 
 * @createDate 2016-11-10 下午6:11:55
 */
@Entity
@Table(name = "sys_handle_permissions_styles")
@DynamicUpdate(true)
@DynamicInsert(true)
public class SysHandlePermissionsStyles implements Serializable {
	
	private static final long serialVersionUID = 33296929079559L;
	
	/**  **/
	private String id;
	/** 主键 **/
	private String handlePermissionId;
	/**  **/
	private String name;
	/**  **/
	private String value;
	/** 权重 **/
	private Integer weight;
	/** 是否禁用 **/
	private Boolean isForbidden;
	/** 创建时间 **/
	private java.sql.Timestamp createTime;
	/** 创建人Id **/
	private String createUserId;
	/**  **/
	private Integer version;
	/** 主键 **/
	private SysHandlePermissions handlePermission;
	
	/**
	 * 方法: 取得主键
	 *
	 * @return SysHandlePermissions 主键
	 */
	@JoinColumn(name = "handlePermissionId" , insertable = false , updatable = false)
	@ManyToOne(fetch = FetchType.LAZY , targetEntity = SysHandlePermissions.class)
	public SysHandlePermissions getHandlePermission() {
		return this.handlePermission;
	}
	
	/**
	 * 方法: 设置主键
	 *
	 * @param handlePermission 主键
	 */
	public void setHandlePermission(SysHandlePermissions handlePermission) {
		this.handlePermission = handlePermission;
	}
	
	/**
	 * 方法: 取得
	 *
	 * @return java.lang.Integer 
	 */
	@Id
	@GeneratedValue(generator = "sys_handle_permissions_stylesIDGenerator" , strategy = GenerationType.AUTO)
	@GenericGenerator(name = "sys_handle_permissions_stylesIDGenerator" , strategy = "uuid")
	@Column(name = "id", nullable= false, length = 11)
	public String getId() {
		return this.id;
	}
	
	/**
	 * 方法: 设置
	 *
	 * @param id 
	 */
	public void setId(String id) {
		this.id = id;
	}
	
	/**
	 * 方法: 取得主键
	 *
	 * @return java.lang.String 主键
	 */
	@Column(name = "handlePermissionId", nullable= true, length = 32)
	public String getHandlePermissionId() {
		return this.handlePermissionId;
	}
	
	/**
	 * 方法: 设置主键
	 *
	 * @param handlePermissionId 主键
	 */
	public void setHandlePermissionId(String handlePermissionId) {
		this.handlePermissionId = StringUtils.isBlank(handlePermissionId) ? null : handlePermissionId;
	}
	
	/**
	 * 方法: 取得
	 *
	 * @return java.lang.String 
	 */
	@Column(name = "name", nullable= true, length = 100)
	public String getName() {
		return this.name;
	}
	
	/**
	 * 方法: 设置
	 *
	 * @param name 
	 */
	public void setName(String name) {
		this.name = name;
	}
	
	/**
	 * 方法: 取得
	 *
	 * @return java.lang.String 
	 */
	@Column(name = "value", nullable= true, length = 500)
	public String getValue() {
		return this.value;
	}
	
	/**
	 * 方法: 设置
	 *
	 * @param value 
	 */
	public void setValue(String value) {
		this.value = value;
	}
	
	/**
	 * 方法: 取得权重
	 *
	 * @return java.lang.Integer 权重
	 */
	@Column(name = "weight", nullable= true, length = 11)
	public Integer getWeight() {
		return this.weight;
	}
	
	/**
	 * 方法: 设置权重
	 *
	 * @param weight 权重
	 */
	public void setWeight(Integer weight) {
		this.weight = weight;
	}
	
	/**
	 * 方法: 取得是否禁用
	 *
	 * @return java.lang.Boolean 是否禁用
	 */
	@Column(name = "isForbidden", nullable= true, length = 1)
	public Boolean getIsForbidden() {
		return this.isForbidden;
	}
	
	/**
	 * 方法: 设置是否禁用
	 *
	 * @param isForbidden 是否禁用
	 */
	public void setIsForbidden(Boolean isForbidden) {
		this.isForbidden = isForbidden;
	}
	
	/**
	 * 方法: 取得创建时间
	 *
	 * @return java.sql.Timestamp 创建时间
	 */
	@Column(name = "createTime", nullable= true, length = 19)
	public java.sql.Timestamp getCreateTime() {
		return this.createTime;
	}
	
	/**
	 * 方法: 设置创建时间
	 *
	 * @param createTime 创建时间
	 */
	public void setCreateTime(java.sql.Timestamp createTime) {
		this.createTime = createTime;
	}
	
	/**
	 * 方法: 取得创建人Id
	 *
	 * @return java.lang.String 创建人Id
	 */
	@Column(name = "createUserId", nullable= true, length = 32)
	public String getCreateUserId() {
		return this.createUserId;
	}
	
	/**
	 * 方法: 设置创建人Id
	 *
	 * @param createUserId 创建人Id
	 */
	public void setCreateUserId(String createUserId) {
		this.createUserId = createUserId;
	}
	
	/**
	 * 方法: 取得
	 *
	 * @return java.lang.Integer 
	 */
    @Version
	@Column(name = "version", nullable= true, length = 11)
	public Integer getVersion() {
		return this.version;
	}
	
	/**
	 * 方法: 设置
	 *
	 * @param version 
	 */
	public void setVersion(Integer version) {
		this.version = version;
	}
}